const db=wx.cloud.database()
Page({
  data:{
    detail:null
  },
  async onLoad(e){
    // console.log(e)
    let id=e.id;
    let result =await db.collection("users").doc(id).get().catch(err=>console.log(err))
    console.log(result)

    this.setData({
      detail:result.data
    })
    
  },
  // 点击全屏查看图片
  preview(e){
    // console.log(e)
    let index=e.currentTarget.dataseIt.index;
    wx.previewImage({
      current:this.data.detail.image[index],
      urls: this.data.detail.image,
    })
  }
})